﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.teradata;

namespace SharpSqlAnalyzer.stmt.teradata
{
	// Token: 0x020000DF RID: 223
	public class TTeradataUsing : TCustomSqlStatement
	{
		// Token: 0x060007AE RID: 1966 RVA: 0x0030100C File Offset: 0x002FF20C
		public TTeradataUsing(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstteradatausing;
		}

		// Token: 0x17000165 RID: 357
		// (get) Token: 0x060007AF RID: 1967 RVA: 0x00301020 File Offset: 0x002FF220
		// (set) Token: 0x060007B0 RID: 1968 RVA: 0x00301028 File Offset: 0x002FF228
		public virtual TColumnDefinitionList ColumnDefinitionList
		{
			get
			{
				return this.columnDefinitionList;
			}
			set
			{
				this.columnDefinitionList = value;
			}
		}

		// Token: 0x17000166 RID: 358
		// (get) Token: 0x060007B1 RID: 1969 RVA: 0x00301031 File Offset: 0x002FF231
		// (set) Token: 0x060007B2 RID: 1970 RVA: 0x00301039 File Offset: 0x002FF239
		public virtual TCustomSqlStatement SqlRequest
		{
			get
			{
				return this.sqlRequest;
			}
			set
			{
				this.sqlRequest = value;
			}
		}

		// Token: 0x060007B3 RID: 1971 RVA: 0x00301044 File Offset: 0x002FF244
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TTeradataUsingSqlNode tteradataUsingSqlNode = (TTeradataUsingSqlNode)this.rootNode;
			this.columnDefinitionList = tteradataUsingSqlNode.ColumnDefinitionList;
			tteradataUsingSqlNode.StmtSqlNode.doParse(this, ESqlClause.unknown);
			this.sqlRequest = tteradataUsingSqlNode.StmtSqlNode.Stmt;
			return 0;
		}

		// Token: 0x060007B4 RID: 1972 RVA: 0x0030109A File Offset: 0x002FF29A
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060007B5 RID: 1973 RVA: 0x003010AA File Offset: 0x002FF2AA
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.sqlRequest.accept(v);
			v.postVisit(this);
		}

		// Token: 0x040011EB RID: 4587
		private TColumnDefinitionList columnDefinitionList;

		// Token: 0x040011EC RID: 4588
		private TCustomSqlStatement sqlRequest;
	}
}
